package com.xiyang.firstfeign.clients;

import com.xiyang.firstfeign.constants.FeignConstant;
import com.xiyang.firstfeign.contracts.FirstFeignContract;
import com.xiyang.firstfeign.fallback.FirstFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

/**
 * 一个feign接口
 * @author xiyang.ycj
 * @since May 31, 2019 09:53:09 AM
 */
//Feign是自带断路器的，它没有默认打开。需要在配置文件中配置打开它 feign.hystrix.enabled=true
@FeignClient(value = FeignConstant.FEIGN_CLIENT_VALUE,url = FeignConstant.FEIGN_CLIENT_URL,path = "xiyang",fallback = FirstFeignFallback.class)
@Component("firstFeignClient")
//@FeignClient(qualifier = "firstFeignClient",value = "first-eureka-client",fallback = FirstFeignFallback.class)
public interface FirstFeignClient extends FirstFeignContract {
}
